/**
 * 
 */
package ivan.cheng.tuqu.graphics;

/**
 * @author zhengfang
 *
 */
public class SpecialEffect {

	public enum E_STUDIO_TYPE {

		uuphoto_editor_cold_blue(0x0),			//	上线
		uuphoto_editor_cold_green(0x1),			//	离线
		uuphoto_editor_warm_yellow(0x2),			//	离开
		uuphoto_editor_gray(0x3),			//	隐身
		uuphoto_editor_retro(0x4),			//	忙碌
		uuphoto_editor_film(0x5),			//	静音
		uuphoto_editor_studio_total(0x6);
		
		private int iStudio;
	    private E_STUDIO_TYPE(int i){
	        this.iStudio=i;
	    } 
	    public int getiStudio(){
	        return this.iStudio;
	    }    
	}
	/**
	 * 函数说明:Lomo效果
	 * @param	pbyInBuffer 包含像素的数据buffer
	 * @param	nInBufferLength pbyInBuffer的长度
	 * @param	pbyOutBuffer 用于底层做过度用的临时buffer
	 * @param	nOutBufferLength pbyOutBuffer的长度
	 * @param	width 图像的宽度
	 * @param	height 图像的高度
	 * @param	eType 哪种特效
	 * */
	public void ChangeStudioExt( short[] pbyInBuffer, int nInBufferLength, short[] pbyOutBuffer, int nOutBufferLength,
			int width,int height,E_STUDIO_TYPE eType)
	{
		ChangeStudioExtJni(pbyInBuffer,nInBufferLength,pbyOutBuffer,nOutBufferLength,width,height,eType.getiStudio());
	}
	
	private native void ChangeStudioExtJni(short[] pbyInBuffer, int nInBufferLength,
			short[] pbyOutBuffer, int nOutBufferLength, int width,int height,int type);

	/**
	 * 函数说明:柔光效果
	 * @param	pbyInBuffer 包含像素的数据buffer
	 * @param	nInBufferLength pbyInBuffer的长度
	 * @param	pbyOutBuffer 用于底层做过度用的临时buffer
	 * @param	nOutBufferLength pbyOutBuffer的长度
	 * @param	width 图像的宽度
	 * @param	height 图像的高度
	 * @param	blur 
	 * @param	light 
	 * */
	public void SoftGlow( short[] pbyInBuffer, int nInBufferLength, short[] pbyOutBuffer, int nOutBufferLength,
			int width,int height,int blur,int light)
	{
		SoftGlowJni(pbyInBuffer,nInBufferLength,pbyOutBuffer,nOutBufferLength,width,height,blur,light);
	}
	
	private native void SoftGlowJni(short[] pbyInBuffer, int nInBufferLength,
			short[] pbyOutBuffer, int nOutBufferLength, int width,int height,int blur,int light);

	/**
	 * 函数说明:数码补光
	 * @param	pbyInBuffer 包含像素的数据buffer
	 * @param	nInBufferLength pbyInBuffer的长度
	 * @param	pbyOutBuffer 用于底层做过度用的临时buffer
	 * @param	nOutBufferLength pbyOutBuffer的长度
	 * @param	width 图像的宽度
	 * @param	height 图像的高度
	 * @param	light_delta 需要补光的值
	 * */
	public void FillLight( short[] pbyInBuffer, int nInBufferLength, short[] pbyOutBuffer, int nOutBufferLength,
			int width,int height,int light_delta)
	{
		FillLightJni(pbyInBuffer,nInBufferLength,pbyOutBuffer,nOutBufferLength,width,height,light_delta);
	}
	
	private native void FillLightJni(short[] pbyInBuffer, int nInBufferLength,
			short[] pbyOutBuffer, int nOutBufferLength, int width,int height,int light_delta);
	
	/**
	 * 函数说明:增加色调
	 * @param	pbyInBuffer 包含像素的数据buffer
	 * @param	nInBufferLength pbyInBuffer的长度
	 * @param	pbyOutBuffer 用于底层做过度用的临时buffer
	 * @param	nOutBufferLength pbyOutBuffer的长度
	 * @param	width 图像的宽度
	 * @param	height 图像的高度
	 * @param	hue_delta 需要调节的色调的值
	 * */
	public void ChangeHue( short[] pbyInBuffer, int nInBufferLength, short[] pbyOutBuffer, int nOutBufferLength,
			int width,int height,int hue_delta)
	{
		ChangeHueJni(pbyInBuffer,nInBufferLength,pbyOutBuffer,nOutBufferLength,width,height,hue_delta);
	}
	
	private native void ChangeHueJni(short[] pbyInBuffer, int nInBufferLength,
			short[] pbyOutBuffer, int nOutBufferLength, int width,int heightm,int hue_delta);

	
	
	public enum E_COMBO_SPEC_EFFECT 
	{
		COMBO_SPEC_EFFECT_TILIANG(0x0),				
		COMBO_SPEC_EFFECT_FUGU(0x1),			
		COMBO_SPEC_EFFECT_HEIBAI(0x2),			
		COMBO_SPEC_EFFECT_QIUSE(0x3),			
		COMBO_SPEC_EFFECT_SUMIAO(0x4),			
		COMBO_SPEC_EFFECT_FENHONG(0x5),			
		COMBO_SPEC_EFFECT_LAOZHAOPIAN(0x6),	
		COMBO_SPEC_EFFECT_ABAO(0x7);
		private int iType;
	    private E_COMBO_SPEC_EFFECT(int i){
	        this.iType=i;
	    } 
	    public int getiType(){
	        return this.iType;
	    }    
	}
	/**
	 * 函数说明:增加色调
	 * @param	pbyInBuffer 包含像素的数据buffer
	 * @param	nInBufferLength pbyInBuffer的长度
	 * @param	pbyOutBuffer 用于底层做过度用的临时buffer
	 * @param	nOutBufferLength pbyOutBuffer的长度
	 * @param	width 图像的宽度
	 * @param	height 图像的高度
	 * @param	eComboType 参见E_COMBO_SPEC_EFFECT
	 * */
	public void ComboSpecEffect( short[] pbyInBuffer, int nInBufferLength, short[] pbyOutBuffer, int nOutBufferLength,
			int width,int height,E_COMBO_SPEC_EFFECT eComboType)
	{
		ComboSpecEffectJni(pbyInBuffer,nInBufferLength,pbyOutBuffer,nOutBufferLength,width,height,eComboType.getiType());
	}
	
	private native void ComboSpecEffectJni(short[] pbyInBuffer, int nInBufferLength,
			short[] pbyOutBuffer, int nOutBufferLength, int width,int heightm,int iType);


}
